package com.zhuiYun.project.api.commodity.service;


import com.zhuiYun.project.api.commodity.entity.Commodity;
import com.zhuiYun.project.api.commodity.model.CommodityModel;
import com.zhuiYun.project.api.commodityType.entity.CommodityType;
import com.zhuiYun.project.common.errorCode.CommonException;
import com.zhuiYun.project.common.response.CommonResult;
import com.zhuiYun.project.util.pageUtil.PageRequest;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @ClassName CommodityService
 * @Description TODO
 * Author 高
 * @Date 2023/4/3 10:29
 * @Version 1.0
 **/
public interface CommodityService {
    /**
     * 分页查询
     * @param commodityModel
     * @param pageRequest
     * @return
     */
    CommonResult getCommodityByPage(CommodityModel commodityModel, PageRequest pageRequest);
    /**
     * 下架商品分页查询
     * @param commodityModel
     * @param pageRequest
     * @return
     */
    CommonResult getCommodityByPage1(CommodityModel commodityModel, PageRequest pageRequest);
    /**
     * 回收站分页查询
     * @param commodityModel
     * @param pageRequest
     * @return
     */
    CommonResult getCommodityByPage2(CommodityModel commodityModel, PageRequest pageRequest);

    /**
     * 新增商品
     * @param
     * @return
     */
    int CommodityAdd(MultipartFile[] goodsImg, MultipartFile[] viewImg, CommodityModel publish) throws CommonException;

    /**
     * 新增未上架商品
     * @param
     * @return
     */
    int CommodityAdd1(MultipartFile[] goodsImg, MultipartFile[] viewImg, CommodityModel publish) throws CommonException;
    /**
     * 修改
     * @param
     * @return
     */
    int CommodityUpdate(MultipartFile[] goodsImg, MultipartFile[] viewImg, CommodityModel publish) throws CommonException;
    /**
     * 下架商品
     * @param id
     * @return
     */
    CommonResult delCommodityById(Integer id) throws CommonException;
    /**
     * 上架商品
     * @param id
     * @return
     */
    CommonResult delCommodityById1(Integer id) throws CommonException;
    /**
     * 删除未上架商品
     * @param id
     * @return
     */
    CommonResult delCommodityById2(Integer id) throws CommonException;
    /**
     * 回复回收站商品
     * @param id
     * @return
     */
    CommonResult delCommodityById3(Integer id) throws CommonException;

    /**
     * 类型下拉框
     * @param
     * @return
     */
    List<CommodityType> getCommodityType();

    CommonResult commodityllist(CommodityModel commodityModel);

    CommonResult delCommodityById4(Integer id) throws CommonException;
}
